<?php
/**
 * 功能描述：	菜单管理
 * @datetime	2022-07-09
 * @version   	v2.3.0
 * @author   	ZHL
 * @copyrigh  	2022 ZHL 版权所有
 */

class Admin_MenuModel extends Model {

    /**
     * Notes: 菜单列表页
     * User: ZHL
     * Date: 2022/7/09
     * @return array|bool
     */
    function getClassList($navtype){
        $sql['field'] = 'c.*,m.mouldname,m.classflag,m.tmplflag';
        $sql['table'] = 'sysmenu';
        $sql['as'] = 'c';
        $sql['leftjoin']['sysmould'] = 'm on c.mould_code=m.mouldcode';
        $sql['order'] = 'c.viewseq desc,c.id asc,c.createdate asc';
        if($navtype == '1' || $navtype == '2'){
            $sql['where']['navtype'] = $navtype;
        }
        $db = $this->conn('mysql');
        return $db->select($sql);
    }
}